import request from '@/utils/request'

// 获取后台全部的历史记录
export function getHistory(uid) {
  return request({
    url: '/prod-api/customerService/csChat/history/list/' + uid,
    method: 'get'
  })
}


// 获取后台最新10条的历史记录
export function getHistoryLimit(data) {
  return request({
    url: '/prod-api/customerService/csChat/history',
    method: 'get',
    params: data
  })
}

// 获取3个月内有联系的用户信息列表
export function getUser() {
  return request({
    url: '/prod-api/customerService/csChat/getUser',
    method: 'get'
  })
}

// 查询所有快捷回复
export function listReply(uid) {
  return request({
    url: '/prod-api/customerService/reply/list',
    method: 'get'
  })
}

// 添加快捷回复
export function addReply(data) {
  return request({
    url: '/prod-api/customerService/reply',
    method: 'post',
    data: data
  })
}

// 删除快捷回复
export function removeReply(replyText) {
  return request({
    url: '/prod-api/customerService/reply/' + replyText,
    method: 'delete'
  })
}

// 获取所有未读的数量
export function getUnreadCount() {
  return request({
    url: '/prod-api/customerService/csChat/unreadCount',
    method: 'get'
  })
}
